package com.zgg

import com.zgg.core.config.ConfigService
import com.zgg.core.config.MongoClient
import com.zgg.core.verticle.HttpWebVerticle
import io.vertx.core.Vertx
import io.vertx.core.logging.Logger
import io.vertx.core.logging.LoggerFactory


/**
 * @author: zgg
 * @date: 2021-07-03 11:17
 */
fun main(args: Array<String>) {
    MongoClient.connect(ConfigService.loadConfig().getJsonObject("Mongo"), "jjgwy")
    val vertx = MainStart.vertx
    //web服务
    vertx.deployVerticle(HttpWebVerticle::class.java.name)
    MainStart.logger.info("---------------启动成功----------------")
}

class MainStart {
    companion object {
        val logger: Logger = LoggerFactory.getLogger(MainStart::class.java)
        val vertx: Vertx = Vertx.vertx()
        val appClass: Class<*>? = MainStart.javaClass
    }
}